function f = a_star_function(point1,point2,target_point)
    f = sqrt((point1.position(1,1) - point2.position(1,1)).^2 + ...
             (point1.position(1,2) - point2.position(1,2)).^2) + ...
        sqrt((point2.position(1,1) - target_point.position(1,1)).^2 + ...
             (point2.position(1,2) - target_point.position(1,2)).^2); %- ...
        %abs(atan2(point1.position(1,1) - point2.position(1,1), ...
                  %point1.position(1,2) - point2.position(1,2)));
end

